﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using DataAccess;
using Model;

namespace ContactManagerApp
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            var list = ContactDAL.GetAll();
            Console.WriteLine("Contacts count:" + list.Count);
            list.ForEach(x =>
            {
                Console.WriteLine(x.ID + " " + x.SortNamePinyin + " LastModifiedTime:" + x.LastModifiedTime+" Create DateTime:"+x.CreatedDate);
            });

            var dd = CategorySumViewDAL.GetAll();
            Console.WriteLine("Category count:" + dd.Count);
            dd.ForEach(x =>
            {
                Console.WriteLine(x.ID + " " + x.Name + " LastModifiedTime:" + x.LastModifiedTime + " Create DateTime:" + x.CreateDate+" Last Sync:"+x.LastSyncTimeSpan+" Child count:"+x.ChildCount);
            });

            Category category = new Category();

            Console.ReadLine();
            return;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }
    }
}
